-- GENERATED SPELL FOR [Sunseeker Herbalist] --


function spell0_19508(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(22127,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19508', 11500, 1)
end

function spell1_19508(pUnit, Event) --@Spade Toss,n/a--
pUnit:FullCastSpellOnTarget(34641,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19508', 599, 1)
end

function spell2_19508(pUnit, Event) --@Spade Toss,n/a--
pUnit:FullCastSpellOnTarget(39129,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19508', 612, 1)
end

function Sorts_19508(pUnit, Event)
local choix_sorts_19508 = math.random(0, 2)
if choix_sorts_19508 == 0 then
pUnit:RegisterEvent('spell0_19508', 1, 1)
end
if choix_sorts_19508 == 1 then
pUnit:RegisterEvent('spell1_19508', 1, 1)
end
if choix_sorts_19508 == 2 then
pUnit:RegisterEvent('spell2_19508', 1, 1)
end
end

function mob19508_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19508', math.random(1500, 3000), 1)
end

function mob19508_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19508_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19508_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19508, 1, 'mob19508_Action')
RegisterUnitEvent(19508, 2, 'mob19508_Leave')
RegisterUnitEvent(19508, 3, 'mob19508_Kill')
RegisterUnitEvent(19508, 4, 'mob19508_Die')
